#include "main/utils.h"
using namespace std;

void subsetsCore(const vector<int>& nums, int index, vector<int>& cur_subset, vector<vector<int>>& results) {
  if (index == nums.size()) {
    results.push_back(cur_subset);
    return;
  }
  subsetsCore(nums, index + 1, cur_subset, results);
  cur_subset.push_back(nums[index]);
  subsetsCore(nums, index + 1, cur_subset, results);
  cur_subset.pop_back();
}

vector<vector<int>> subsets(const vector<int>& nums) {
  vector<vector<int>> ret;
  vector<int> cur_subset;
  subsetsCore(nums, 0, cur_subset, ret);
  return ret;
}

int main() {
  vector<int> nums = {1, 2, 3};
  auto ret = subsets(nums);
  printVec("o79", ret);

  return 0;
}
